package EveryDayPractice;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class Practice50 {
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("stud");
        BufferedWriter bw = new BufferedWriter(fw);
        Scanner sc = new Scanner(System.in);
        bw.write("学生号 姓名 语文  数学  英语 平均分\n");
  for (int i = 1; i <= 5; i++) {
      {
          System.out.println("请输入学生姓名");
          String name=sc.nextLine();
          System.out.println("语文成绩");
          int yuwen=sc.nextInt();
          System.out.println("数学成绩");
          int shuxue=sc.nextInt();
          System.out.println("英语成绩");
          int yinyu=sc.nextInt();
          sc.nextLine();
          bw.write(i+"     "+name+"  "+yuwen+"  "+shuxue+"  "+yinyu+"  "+(shuxue+yinyu+yuwen)/3+"\n");
      }
  }
        bw.close();

    }
}
